import dayjs from 'dayjs'
import { request } from '../../utils/request'
export const getAllActivity = () => {
  return request({
    url: '/alumnia/activity/app/listWithMe',
    method: 'GET',
    data: {
      endTime: dayjs().format('YYYY-MM-DD HH:mm:ss')
    }
  })
}

export const joinActivity = (params) => {
  return request({
    url: '/alumnia/activity/user',
    method: 'post',
    data: params
  })
}

export const exitActivity = (params) => {
  return request({
    url: `/alumnia/activity/user/delete`,
    method: 'post',
    data: params
  })
}
export const getDetail = (activityId, openid) => {
  return request({
    url: '/alumnia/activity/app/detail',
    method: 'GET',
    data: {
      activityId,
      openid
    }
  })
}